Known examples of such a cylinder device having the position detection function include a device described in Patent Literature 1 (Japanese Unexamined Patent Publication No. 2014-108490).
A first embodiment (see FIG. 2 and FIG. 5) of the above known art is structured as follows.
A piston is inserted into a housing, and a lock chamber is provided above the piston, while a release chamber is provided below the piston. The piston is raised when pressurized oil is discharged from the lock chamber and pressurized oil is supplied to the release chamber. By the pressurized oil supplied to the release chamber, a valve body of a detection-purpose on-off valve to detect the position of the piston is switched from an open position (upper position) to a closed position (lower position), and the valve body closes an air detection passage through which detection-purpose air is supplied. Then, a pressure switch detects a pressure rise at an upstream side of the closed air detection passage, and thereby detects that the piston is at a raised position.
Meanwhile, a third embodiment (see FIG. 11 and FIG. 13) of the above known art is structured as follows.
A compression spring biasing the valve body downward is attached to an upper portion of the valve body. When pressurized oil is discharged from the release chamber on the lower side and pressurized oil is supplied to the lock chamber on the upper side, the piston is lowered. As a result, the valve body of the detection-purpose on-off valve is closed by the biasing force of the compression spring. Then, similarly to the above-mentioned first embodiment, the pressure switch detects a pressure rise at the upstream side of the air detection passage, and thereby detects that the piston is at a lowered position.